home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / hmm.asm < prev    next >
Encoding:
Assembly Source File  |  1999-06-18  |  2.6 KB  |  148 lines

  1. ;oh, reversing reversing reversing.. how much phun..NOT.. my brain hurts..
  2.  
  3. ;tasm32 /ml hmm
  4. ;tlink32 -x /Tpe /aa /c hmm,hmm
  5.  
  6. ; DONT RUN THE COMPILED EXE, JUST COPY&PASTE THE CODE FROM IT INTO D4CRACKME.EXE
  7.  
  8.  
  9. .386P
  10. Locals
  11.  
  12.  
  13. .Model Flat ,StdCall
  14.  
  15. .Data
  16.  
  17.  
  18. data   db "R!SC is BaCK!!!",0
  19.  
  20.  
  21. .Code
  22.  
  23. main:
  24. lo011: db 'sometext'    ; just so i can find the code easily in the compiled 'exe and in the 
  25.      dd 90909090h       ; exe i paste it into, when i search its memory..
  26.      db 90h,90h,90h,0cch
  27. blood:
  28. push esi
  29. mov esi, 00405514h  ; address of 8 character string to brute
  30. jmp brute_loop
  31. itsok:
  32. pop esi
  33. mycall: db 90h,90h,90h,90h,90h,90h    ; put call to code and whatever else in this space
  34. test eax,eax
  35. je blood
  36.  
  37. int 03
  38.  
  39.  
  40.  
  41.  
  42. brute_loop:
  43. inc byte ptr [esi]
  44. cmp byte ptr [esi], 3ah ; 39h=9 ascii, 3ah=goto 'A'
  45. jl  itsok
  46. cmp byte ptr [esi], 40h ; lower than 40h? need to be letters now..
  47. jl  skipjunk
  48. cmp byte ptr [esi], 47h ; 46h=F ascii
  49. jl  itsok
  50. mov byte ptr [esi], 30h ; reset to 0 and increase next value
  51.  
  52. inc byte ptr [esi+1]
  53. cmp byte ptr [esi+1], 3ah
  54. jl  itsok
  55. cmp byte ptr [esi+1], 40h
  56. jl  skipjunk1
  57. cmp byte ptr [esi+1], 47h
  58. jl  itsok
  59. mov byte ptr [esi+1], 30h
  60.  
  61. inc byte ptr [esi+2]
  62. cmp byte ptr [esi+2], 3ah
  63. jl  itsok
  64. cmp byte ptr [esi+2], 40h
  65. jl  skipjunk2
  66. cmp byte ptr [esi+2], 47h
  67. jl  itsok
  68. mov byte ptr [esi+2], 30h
  69.  
  70. inc byte ptr [esi+3]
  71. cmp byte ptr [esi+3], 3ah
  72. jl  itsok
  73. cmp byte ptr [esi+3], 40h
  74. jl  skipjunk3
  75. cmp byte ptr [esi+3], 47h
  76. jl  itsok
  77. mov byte ptr [esi+3], 30h
  78.  
  79. inc byte ptr [esi+4]
  80. cmp byte ptr [esi+4], 3ah
  81. jl  itsok
  82. cmp byte ptr [esi+4], 40h
  83. jl  skipjunk4
  84. cmp byte ptr [esi+4], 47h
  85. jl  itsok
  86. mov byte ptr [esi+4], 30h
  87.  
  88. inc byte ptr [esi+5]
  89. cmp byte ptr [esi+5], 3ah
  90. jl  itsok
  91. cmp byte ptr [esi+5], 40h
  92. jl  skipjunk5
  93. cmp byte ptr [esi+5], 47h
  94. jl  itsok
  95. mov byte ptr [esi+5], 30h
  96.  
  97. inc byte ptr [esi+6]
  98. cmp byte ptr [esi+6], 3ah
  99. jl  itsok
  100. cmp byte ptr [esi+6], 40h
  101. jl  skipjunk6
  102. cmp byte ptr [esi+6], 47h
  103. jl  itsok
  104. mov byte ptr [esi+6], 30h
  105.  
  106. inc byte ptr [esi+7]
  107. cmp byte ptr [esi+7], 3ah
  108. jl  itsok
  109. cmp byte ptr [esi+7], 40h
  110. jl  skipjunk7
  111. cmp byte ptr [esi+7], 47h
  112. jl  itsok
  113. int 03
  114.  
  115. skipjunk:
  116. mov byte ptr [esi], 41h ; just to skip values 3ah-40h, junk values..
  117. jmp itsok
  118.  
  119. skipjunk1:
  120. mov byte ptr [esi+1], 41h
  121. jmp itsok
  122.  
  123. skipjunk2:
  124. mov byte ptr [esi+2], 41h
  125. jmp itsok
  126.  
  127. skipjunk3:
  128. mov byte ptr [esi+3], 41h
  129. jmp itsok
  130.  
  131. skipjunk4:
  132. mov byte ptr [esi+4], 41h
  133. jmp itsok
  134.  
  135. skipjunk5:
  136. mov byte ptr [esi+5], 41h
  137. jmp itsok
  138.  
  139. skipjunk6:
  140. mov byte ptr [esi+6], 41h
  141. jmp itsok
  142.  
  143. skipjunk7:
  144. mov byte ptr [esi+7], 41h
  145. jmp itsok
  146.  
  147.  
  148. End main